2016-06-02
While we think the updated dialect is a wonderful addition, there's no requirement that users switch, and for production use cases, we recommend users remain on the legacy SQL dialect. After we have a few more miles on the new dialect, we plan to launch it to general availability and recommend it as the default language for all projects.
2016-10-04
Migration from legacy SQL to standard SQL is recommended but not required.
窓に!窓に!
について予習しておきましょう🐼
(止まるとは言ってない)
CREATE TEMPORARY TABLE みたいなやつ| Legacy | Standard |
|---|---|
| INTEGER | INT64 |
| FLOAT | FLOAT64 |
| RECORD | STRUCT |
| REPEATED | ARRAY |
| Legacy | Standard |
|---|---|
|
REQUIRED NULLABLE |
NULLABLE |
| Legacy | Standard |
|---|---|
[sample.foo]
|
`sample.foo`
|
| Legacy | Standard |
|---|---|
| project-name:dataset.table | project-name.dataset.table |
| Legacy | Standard |
|---|---|
| SELECT 1,2,3, FROM | SELECT 1,2,3 FROM |
LegacyのViewをStandardのクエリからは使えない
(逆もダメ)
| Legacy | Standard |
|---|---|
|
INTEGER(1.5) 切り捨て |
CAST(1.5 AS INTEGER) 四捨五入 |
| Legacy | Standard |
|---|---|
|
SELECT 1 / 0 NULL |
SELECT 1 / 0 Error: division by zero |
他: オーバーフロー, 無効なCAST
安全な0除算: SAFE_DIVIDE
UDF(User-Defined Functions)
101 (文字列結合)🐼「ここから先は君自身の目で確かめてくれ!」